import 'package:flutter/foundation.dart';

Map<String, dynamic> _debugEnvMap = {
  'apiBaseUrl': 'http://localhost:8080',
};
Map<String, dynamic> _prodEnvMap = {
  'apiBaseUrl': 'https://prod.api.com',
};

class Env {
  static late Map<String, dynamic> _envs;

  Env._();
  static void init() {
    _envs = kReleaseMode ? _prodEnvMap : _debugEnvMap;
  }

  static bool get isDev => !kReleaseMode;
  static bool get isProd => kReleaseMode;

  static String get apiBaseUrl {
    return _envs['apiBaseUrl'];
  }
}
